<?php
/**
 * @auther:周卫星
 * @date:2019/10/29
 * @fileName:add.blade.php
 * @fileDesc: 添加商户页面
 */
?>

@extends('admin_layout.layout')
@section('title', '添加商户')
@push('css')
@endpush

@push('js')
    <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=b2033c035d0b707892bd52f2ad6b61e9&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.CitySearch"></script>
    <script src="{{ Illuminate\Support\Facades\URL::asset('js/admin/biz/add.js') }}"></script>
@endpush
@section('content')
    <form class="layui-form" action="">
        <input type="hidden" name="_token" value="{{ csrf_token() }}">
        <div class="layui-form-item">
            <label class="layui-form-label"><i style="color: red; font-size: 18px; padding-right: 5px">*</i>商户名称</label>
            <div class="layui-input-block">
                <input type="text" name="name" required  lay-verify="required" placeholder="请输入商户名称" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">商户分类</label>
            <div class="layui-input-block">
                <select name="category" lay-verify="required">
                    <option value="">请选择分类</option>
                    <option value="西餐">西餐</option>
                    <option value="粤菜">粤菜</option>
                    <option value="湘菜">湘菜</option>
                    <option value="清真口味">清真口味</option>
                    <option value="风味特产">风味特产</option>
                    <option value="自助餐">自助餐</option>
                    <option value="韩国菜">韩国菜</option>
                    <option value="日本菜">日本菜</option>
                    <option value="江浙菜">江浙菜</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><i style="color: red; font-size: 18px; padding-right: 5px">*</i>用户名</label>
            <div class="layui-input-block">
                <input type="text" name="username" required  lay-verify="required" placeholder="请输入用户名" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><i style="color: red; font-size: 18px; padding-right: 5px">*</i>密码</label>
            <div class="layui-input-block">
                <input type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><i style="color: red; font-size: 18px; padding-right: 5px">*</i>确认密码</label>
            <div class="layui-input-block">
                <input type="password" name="confirm_pwd" required lay-verify="required|confirmPwd" placeholder="请确认密码" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><i style="color: red; font-size: 18px; padding-right: 5px">*</i>联系人</label>
            <div class="layui-input-block">
                <input type="text" name="truename" required  lay-verify="required" placeholder="请输入联系人" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><i style="color: red; font-size: 18px; padding-right: 5px">*</i>联系人电话</label>
            <div class="layui-input-block">
                <input type="tel" name="tel" required  lay-verify="required" placeholder="请输入联系人电话" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><i style="color: red; font-size: 18px; padding-right: 5px">*</i>联系地址</label>
            <div class="layui-input-block">
                <input type="text" id="address" name="address" required  lay-verify="required" placeholder="请输入联系地址 eg:北京市朝阳区朝阳大悦城" autocomplete="off" class="layui-input">
                <input type="hidden" name="longitude" value="">
                <input type="hidden" name="latitude" value="">
                <div id="selectMap" style="width: 50%; height: 300px"></div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">身份证号</label>
            <div class="layui-input-block">
                <input type="text" name="idcard" placeholder="请输入身份号" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">身份证正面</label>
            <div class="layui-input-block">
                <button type="button" class="layui-btn" id="idfront">
                    <i class="layui-icon">&#xe67c;</i>身份证正面上传
                </button>
                <div id="idfrontImg" class='viewImg' style="width: 50px;">
                </div>
                <input type="hidden" name="idfront" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">身份证背面</label>
            <div class="layui-input-block">
                <button type="button" class="layui-btn" id="idback">
                    <i class="layui-icon">&#xe67c;</i>身份证背面上传
                </button>
                <div id="idbackImg" class='viewImg' style="width: 50px;">
                </div>
                <input type="hidden" name="idback" placeholder="请输入联系人电话" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><i style="color: red; font-size: 18px; padding-right: 5px">*</i>执照名称</label>
            <div class="layui-input-block">
                <input type="text" name="business_license_name" required  lay-verify="required" placeholder="请输入营业执照的名称" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">执照注册号</label>
            <div class="layui-input-block">
                <input type="text" name="business_license_code" placeholder="请输入营业执照的注册号" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">注册地址</label>
            <div class="layui-input-block">
                <input type="text" name="business_license_address" placeholder="请输入营业执照的注册地址" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">有效期</label>
            <div class="layui-input-block">
                <input type="text" name="business_license_expire" id="business_license_expire" placeholder="请选择营业执照的有限期" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">营业执照</label>
            <div class="layui-input-block">
                <button type="button" class="layui-btn" id="businessImage">
                    <i class="layui-icon">&#xe67c;</i>营业执照上传
                </button>
                <div id="bLImage" class='viewImg' style="width: 50px;">
                </div>
                <input type="hidden" name="business_license_image" placeholder="请输入联系人电话" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">许可证名称</label>
            <div class="layui-input-block">
                <input type="text" name="catering_service_license_name" placeholder="请输入餐饮服务许可证的名称" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">许可编号</label>
            <div class="layui-input-block">
                <input type="text" name="catering_service_license_no" placeholder="请输入餐饮服务许可证的许可编号" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">许可地址</label>
            <div class="layui-input-block">
                <input type="text" name="catering_service_license_address" placeholder="请输入餐饮服务许可证的许可地址" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">有效期</label>
            <div class="layui-input-block">
                <input type="text" name="catering_service_license_expire" id="catering_service_license_expire" placeholder="请选择餐饮服务许可证的有效期" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">许可证</label>
            <div class="layui-input-block">
                <button type="button" class="layui-btn" id="cateringImage">
                    <i class="layui-icon">&#xe67c;</i>许可证上传
                </button>
                <div id="cImage" class='viewImg' style="width: 50px;">
                </div>
                <input type="hidden" name="catering_service_license_image" placeholder="请输入联系人电话" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="addBiz">添加</button>
            </div>
        </div>
    </form>
@endsection
